﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Prism.Regions;
using Microsoft.Practices.Unity;

using RZD_maps.Modules.Ribbon.Views;

namespace RZD_maps.Modules.Ribbon 
{
    public class RibbonModule : IModule
    {
        private readonly IRegionManager regionManager;
        private readonly IUnityContainer container;

        public RibbonModule(IUnityContainer container, IRegionManager regionManager)
        {
            this.container = container;
            this.regionManager = regionManager;
        }

        public void Initialize()
        {
            //this.container.RegisterType<IStationsRepository, StationsRepository>(new ContainerControlledLifetimeManager());
            this.regionManager.RegisterViewWithRegion("RibbonRegion",
                                                       () => this.container.Resolve<RibbonView>());
        }
    }
}
